mwait-idle: allow sparse sub-state numbering, for Bay Trail
authorLen Brown <len.brown@intel.com>
Wed, 2 Jul 2014 12:49:37 +0000 (14:49 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 2 Jul 2014 12:49:37 +0000 (14:49 +0200)
commit4d9dfc3803da005b6278df6f5336db4fb95da703
tree78f94c9bdd5a910d490ece483516cef59c3e86c6
parentc66a35b837d0799a1451668203744c61ddd3a356
mwait-idle: allow sparse sub-state numbering, for Bay Trail

Like acpi_idle, mwait-idle compared sub-state numbers
to the number of supported sub-states -- discarding
sub-states numbers that were numbered >= the number of states.

But some Bay Trail SOCs use sparse sub-state numbers,
so we can't make such a comparison if we are going
to access those states.

So now we simply check that _some_ sub-states are
supported for the given state, and assume that the
sub-state number in our driver is valid.

In practice, the driver is correct, and even if it were not,
the hardware clips invalid sub-state requests to valid ones.

No entries in the driver require this change,
but Bay Trail will need it.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/mwait-idle.c